"""
@author: wy
@file: python自省.py
@time: 2023/5/22 10:14
"""
import sys
import funcmode
# def func1():
#     print("this is func1")
#
# def func2():
#     print("this is func2")

try:
    input_func = sys.argv[1]
    print(f"传递进来的参数:{input_func}")
    if hasattr(funcmode, input_func):
        print(f"获取到{input_func}")
        getattr(funcmode,  input_func)()
except Exception as e:
    print(e)